<template>
  <el-tabs class="ct-class-form" type="border-card" v-model="activeTable" >
    <el-tab-pane :name="String(index)"  :label="item.title" v-for="(item,index) in value" :key="index">
      <el-scrollbar ref="ct-class-form-body" :native="false" :noresize="false">
        <component :is="item.components" v-model="item.data"></component>
      </el-scrollbar>
    </el-tab-pane>
  </el-tabs>
</template>
<script type="text/javascript">
export default {
  props: {
    value: [Array, Object]
  },
  data() {
    return {
      activeTable: 0
    }
  },
  /**
   * 计算属性
   * @type {Object}
   */
  computed: {

  },
  /**
   * 数据监听
   * @type {Object}
   */
  watch: {
    value: function(value) {
      this.activeTable = String(0);
    }
  },
  /**
   * 页面加载执行
   * @return {[type]} [description]
   */
  mounted() {

  },
  /**
   * 页面方法
   * @type {Object}
   */
  methods: {

  }
}

</script>
<style type="text/css" lang="scss">
</style>
